-
-
Notifications
You must be signed in to change notification settings - Fork 371
fix: AOT interop with managed .NET runtimes #6193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6193 +/- ##
=============================================
- Coverage 85.506% 85.421% -0.086%
=============================================
Files 451 451
Lines 27565 27602 +37
Branches 12066 12079 +13
=============================================
+ Hits 23570 23578 +8
- Misses 3951 3979 +28
- Partials 44 45 +1
... and 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
This reverts "Use pre-built version of sentry-cocoa SDK (#3727)" commit d179ec9 and restores the modules/sentry-cocoa Git module checked out at: getsentry/sentry-cocoa#6193
2f90356 to
ed98b04
Compare
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| bc0a04c | 1226.83 ms | 1255.04 ms | 28.21 ms |
| e8f9a1d | 1229.02 ms | 1264.17 ms | 35.15 ms |
| 2a36c3f | 1227.27 ms | 1246.89 ms | 19.63 ms |
| 5712478 | 1220.10 ms | 1239.69 ms | 19.59 ms |
| fd5961e | 1210.59 ms | 1235.57 ms | 24.98 ms |
| 3b373bb | 1218.19 ms | 1250.57 ms | 32.38 ms |
| 8fd192f | 1202.10 ms | 1220.19 ms | 18.09 ms |
| bbe6658 | 1221.00 ms | 1248.51 ms | 27.51 ms |
| cd67f52 | 1216.29 ms | 1255.27 ms | 38.99 ms |
| 07d7e83 | 1211.71 ms | 1240.08 ms | 28.37 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| bc0a04c | 23.75 KiB | 933.32 KiB | 909.57 KiB |
| e8f9a1d | 23.75 KiB | 969.78 KiB | 946.04 KiB |
| 2a36c3f | 23.75 KiB | 874.45 KiB | 850.71 KiB |
| 5712478 | 23.75 KiB | 969.28 KiB | 945.54 KiB |
| fd5961e | 23.74 KiB | 874.07 KiB | 850.32 KiB |
| 3b373bb | 23.75 KiB | 947.72 KiB | 923.97 KiB |
| 8fd192f | 23.74 KiB | 872.75 KiB | 849.01 KiB |
| bbe6658 | 23.75 KiB | 908.02 KiB | 884.27 KiB |
| cd67f52 | 23.75 KiB | 1.01 MiB | 1016.04 KiB |
| 07d7e83 | 23.75 KiB | 913.27 KiB | 889.52 KiB |
Screen.Recording.2025-09-18.at.11.54.52.mov |
ed98b04 to
8559ea9
Compare
db30de0 to
dd33f14
Compare
dd33f14 to
e51c82e
Compare
📜 Description
Prevent the Cocoa SDK from capturing managed .NET exceptions.
First of all, we need to avoid overriding Mono's Mach exception port for
EXC_BAD_ACCESSandEXC_ARITHMETICto allow handling the respective Unix signals. Secondly, Sentry's signal handler has to first invoke Mono's signal handler to give it a chance to convert it into a managed exception and redirect execution into the managed runtime’s exception handling machinery, so that managed code can catch and process the exception as if it were a normal .NET exception. Finally, Sentry's crash capturing kicks in only if we do not detect instruction or stack pointer modifications in the context.💡 Motivation and Context
Fixes a long-standing issue with redundant crash events with Sentry.NET on iOS:
See also similar Sentry Native changes for Android:
💚 How did you test it?
Sentry.Samples.Mauiin Sentry.NET:📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.